package chapter4.read

import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}

import scala.util.control.Breaks

object Chapter4_3_4 extends App {


  val conf = new SparkConf().setMaster("local").setAppName(this.getClass.getName)

  val sc = new SparkContext(conf)

  val path = "file:///"
  private val rdd: RDD[String] = sc.textFile(path)

//  rdd.sample()

  Breaks.breakable(
    for(i <- 1 to 10){
      if(i>5){
        Breaks.break()
      }
    }
  )


}
